<template>
    <div>
        <van-nav-bar :title="`购物车(${cartCount})`" left-text="返回" left-arrow @click-left="$router.push('/home')" />
        <van-empty description="购物车无内容" />
        <div class="btn">
            <van-button type="danger" round @click="$router.push('/home')">立即购物</van-button>
        </div>
        <van-divider dashed>可能你还想要</van-divider>
        <van-submit-bar :price="3050" button-text="合计" @submit="$router.push('/pay')">
            <van-checkbox v-model="checked">全选</van-checkbox>
        </van-submit-bar>
    </div>
</template>
<script lang='ts' setup>
import { showToast } from 'vant';
import { ref } from 'vue';
import { getCartListData, setAllChecked, setOneChecked, deleteCartData } from '@/api/cart'
const cartListArr = ref([]);
getCartListData().then(res => {
    console.log('cartListRes', res);
    // cartListArr.value=

})
const checked = ref<boolean>(false)
const onSubmit = () => showToast('点击按钮');
const onClickLink = () => showToast('修改地址');
const cartCount = ref<number>(0);
</script>
 
<style lang='scss' scoped>
.van-submit-bar {
    margin-bottom: 50px;
}

.btn {
    .van-button {
        width: 200px;
    }

    text-align: center;
}
</style>